package com.ruoyi.merchant.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.ServiceDetailsMapper;
import com.ruoyi.merchant.domain.ServiceDetails;
import com.ruoyi.merchant.service.IServiceDetailsService;

/**
 * 服务详情Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-15
 */
@Service
public class ServiceDetailsServiceImpl implements IServiceDetailsService {
    @Autowired
    private ServiceDetailsMapper serviceDetailsMapper;

    @Override
    public List<ServiceDetails> selectTypeShopId(Integer shopId) {
        List<ServiceDetails> serviceDetails = serviceDetailsMapper.selectTypeShopId(shopId);
        return serviceDetails;
    }

    /**
     * 查询服务详情
     *
     * @param id 服务详情主键
     * @return 服务详情
     */
    @Override
    public ServiceDetails selectServiceDetailsById(Integer id) {
        return serviceDetailsMapper.selectServiceDetailsById(id);
    }

    /**
     * 查询服务详情列表
     *
     * @param serviceDetails 服务详情
     * @return 服务详情
     */
    @Override
    public List<ServiceDetails> selectServiceDetailsList(ServiceDetails serviceDetails) {
        return serviceDetailsMapper.selectServiceDetailsList(serviceDetails);
    }

    /**
     * 新增服务详情
     *
     * @param serviceDetails 服务详情
     * @return 结果
     */
    @Override
    public int insertServiceDetails(ServiceDetails serviceDetails) {
        return serviceDetailsMapper.insertServiceDetails(serviceDetails);
    }

    /**
     * 修改服务详情
     *
     * @param serviceDetails 服务详情
     * @return 结果
     */
    @Override
    public int updateServiceDetails(ServiceDetails serviceDetails) {
        return serviceDetailsMapper.updateServiceDetails(serviceDetails);
    }

    /**
     * 批量删除服务详情
     *
     * @param ids 需要删除的服务详情主键
     * @return 结果
     */
    @Override
    public int deleteServiceDetailsByIds(Integer[] ids) {
        return serviceDetailsMapper.deleteServiceDetailsByIds(ids);
    }

    /**
     * 删除服务详情信息
     *
     * @param id 服务详情主键
     * @return 结果
     */
    @Override
    public int deleteServiceDetailsById(Integer id) {
        return serviceDetailsMapper.deleteServiceDetailsById(id);
    }
}
